﻿using UnityEngine;
using System.Collections;

public class WarriorAI : MonoBehaviour {
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		MoveTo(DetectPlayer());	
	}

	Vector3 DetectPlayer(){
		Vector3 player = GameObject.FindGameObjectWithTag("Player").gameObject.transform.position;
		return player;
	}

	void MoveTo(Vector3 position){
		transform.position = Vector3.Lerp(transform.position,position,Time.deltaTime);
	}

	/*void Attack(){
	}*/
}
